package com.github.xuemingyu.springboot.acticitycloud.service.impl;

import com.github.xuemingyu.springboot.acticitycloud.dao.SignRecordDao;
import com.github.xuemingyu.springboot.acticitycloud.entity.SignRecord;
import com.github.xuemingyu.springboot.acticitycloud.service.SignRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;

@Service
public class SignRecordServiceImpl extends BaseServiceImpl<SignRecord> implements SignRecordService {
    @Autowired
    private SignRecordDao signRecordDao;

    @Override
    public void insert(SignRecord signRecord) {
        signRecordDao.save(signRecord);
    }

    @Override
    public void update(SignRecord signRecord) {
        SignRecord one = signRecordDao.findOne(signRecord.getId());
        one.setStatus(signRecord.getStatus());
        signRecordDao.save(one);

    }

    @Override
    protected JpaRepository<SignRecord, Long> getDao() {
        return null;
    }
}
